
#import <Cocoa/Cocoa.h>

@class Asset;
@class AssetCollection;
@class AssetCollectionView;
@class SlideshowView;

@interface BrowserWindowController : NSWindowController
{
    // Model
    NSString *path;                                     // path to folder whose image files the browser is displaying
    AssetCollection *assetCollection;                   // the collection of pictures that the browser is displaying

    // Views
    IBOutlet AssetCollectionView *assetCollectionView;  // the container view in which the slides are positioned
    IBOutlet SlideshowView *slideshowView;              // the view in which we display the slideshow with transition effects

    // UI State
    NSString *sortKey;                                  // name of property on which to sort our pictures
    BOOL sortsAscending;                                // YES if sort should be ascending; NO if descending
    Asset *slideshowCurrentAsset;                       // currently displayed picture in slideshow
    NSTimeInterval slideshowInterval;                   // time interval between slide changes (seconds)
    NSTimer *slideshowTimer;                            // timer used to advance the slideshow
}
- initWithPath:(NSString *)newPath;

- (NSTimeInterval)slideshowInterval;
- (void)setSlideshowInterval:(NSTimeInterval)newSlideshowInterval;

- (NSString *)sortKey;
- (void)setSortKey:(NSString *)newSortKey;

- (BOOL)sortsAscending;
- (void)setSortsAscending:(BOOL)flag;

- (IBAction)refresh:(id)sender;
- (IBAction)showSlideshowWindow:(id)sender;
@end
